﻿using QControlCenter.ViewModel;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace QControlCenter.Pages
{
	/// <summary>
	/// ParameterSetting.xaml 的交互逻辑
	/// </summary>
	public partial class ParameterSetting : UserControl
	{
		public ParameterSetting()
		{
			InitializeComponent();			
			this.DataContext = new ParameterSettingViewModel();
		}

		public static readonly DependencyProperty RegionProperty = DependencyProperty.Register("Region", typeof(string), typeof(ParameterSetting));
		public string Region
		{
			get { return (string)GetValue(RegionProperty); }
			set
			{
				SetValue(RegionProperty, value);
				if(this.DataContext is  ParameterSettingViewModel temp)
				{
					temp.Region = value;
				}
			}
		}
	}
}
